<?php
namespace App\Admin\Models;
use Common\BaseModel;
class Levels  extends BaseModel
{
	public $res;
	public $redis_key="index_category";
	public function getSource()
	{
		return "f_levels";
	}
	public function initialize()
	{
		parent::initialize();

	}
    //获取所有分类
    public function find_by_level_name($id){
        $level = $this->findFirstById($id);
        if($level){
            $level_name = $level->name;
        }else{
            $level_name = '合伙人';
        }
        return $level_name;
    }
}
